
public class randomarray {
  public int[] generate(int[] a){
	  int arr[] =new int[a.length];
	  for(int i=0;i<a.length;i++){
		  arr[i]=(int)(Math.random()*100);
		  
	  }
	  return arr;
	  
  }
  public void dispaly(int[] a){
	  for(int i=0;i<a.length;i++){
		  System.out.println(a[i]);
	  }
  }
	public static void main(String[] args) {
		randomarray rand =new randomarray();
		int ar1[] =new int[8];
		int ar2[]=new int[8];
		ar2=ar1;
		ar1=rand.generate(ar1);
		rand.dispaly(ar1);
		System.out.println("array of second digit is"+ar1[2]);
		ar1[2]=237890;
		System.out.println("array of second digit is"+ar1[2]);
		
		rand.dispaly(ar1);

	}

}
